{extend name="public:layout" /}

{block name="title"}
	<title>{:site('siteName')}-注册</title>
{/block}

{block name="css"}
	<link rel="stylesheet" type="text/css" href="__STATIC__/{$theme}/css/register.css">
{/block}

{block name="content"}
	<div class="layui-main">
		<div class="register">
			<div class="reg-head">
				<img src="__STATIC__/{$theme}/img/reg_head.png" alt="">
			</div>
			<hr>
			<p>欢迎来到{:site('siteName')}，请填写你的账户信息</p>
	    	<div class="reg-form">
	    		<form class="layui-form" action="{:url('index/user/register')}" method="post">
				  	<div class="layui-form-item">
				    	<label class="layui-form-label">用户名</label>
				    	<div class="layui-input-inline">
				      		<input type="text" name="username" lay-verify="required|username" placeholder="" class="layui-input">
				    	</div>
				    	<div class="layui-form-mid layui-word-aux">字母数字下划线</div>
				  	</div>
				  	<div class="layui-form-item">
				    	<label class="layui-form-label">密码</label>
				    	<div class="layui-input-inline">
				      		<input type="password" name="password" lay-verify="required|password" placeholder="" class="layui-input">
				    	</div>
				  	</div>
				  	<div class="layui-form-item">
				    	<label class="layui-form-label">确认密码</label>
				    	<div class="layui-input-inline">
				      		<input type="password" name="passwords" lay-verify="required|passwords" placeholder="" class="layui-input">
				    	</div>
				  	</div>
				  	<div class="layui-form-item">
				    	<label class="layui-form-label">邀请人ID</label>
				    	<div class="layui-input-inline">
				      		<input type="text" name="invite" placeholder="" value="{$invite_id|default=''}" class="layui-input">
				    	</div>
				    	<div class="layui-form-mid layui-word-aux">无邀请人请留空</div>
				  	</div>
				  	<div class="layui-form-item">
				    	<label class="layui-form-label">手机号</label>
				    	<div class="layui-input-inline">
				      		<input type="text" name="mobile" lay-verify="required|phone" placeholder="" class="layui-input">
				    	</div>
				  	</div>
				  	<div class="layui-form-item">
				    	<label class="layui-form-label">短信验证码</label>
				    	<div class="layui-input-inline sms">
				      		<input type="text" name="code" lay-verify="required|number" placeholder="" class="layui-input">
				    	</div>
				    	<button class="layui-btn layui-btn-primary" id="sendSms">发送短信</button>
				  	</div>
				  	<div class="layui-form-item">
				    	<div class="layui-input-block">
				    		<input type="checkbox" name="agreement" lay-verify="required" title="我已查看并同意注册协议" value="1" lay-filter="agreement" lay-skin="primary">
				    	</div>
				  	</div>
				  	<div class="layui-form-item">
				    	<div class="layui-input-block">
				    		<input type="hidden" name="__token__" value="{$Request.token}" />
				      		<button class="layui-btn layui-btn-danger reg-btn" lay-submit>注 册</button>
				    	</div>
				  	</div>
				</form>
	    	</div>
		</div>
	</div>
{/block}

{block name="script"}
	<script type="text/javascript">
		var agreement = '{:site("agreement")}';
	</script>
	<script src="__STATIC__/{$theme}/js/register.js" type="text/javascript"></script>
{/block}